<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        /*
        * The difference is scoping. var is scoped to the nearest function block
         * and let is scoped to the nearest enclosing block (both are global if outside any block),
         * which can be smaller than a function block.
         * 详细请看：http://stackoverflow.com/questions/762011/let-keyword-vs-var-keyword
        * */

        var a=1;
        if(a>0){
            let b=2;
            var c=3;
        }
        function callbackPlay(){
            document.write("callback is invoke"+"<br>")
        }
        function soso(callback) {
            var d=12;
            document.write(d+"1230"+"<br>")
            callback();
        }
        soso(callbackPlay);
        //document.write("d="+d);//d是显示不出来的，我好像有点懂了
        document.write("a="+a+"<br>")//
       // document.write("var c="+c+"<br>")//c可以显示出来。
        //document.write("let b="+b+"<br>")//b 不可以显示出来


    </script>



</head>
<body>

</body>
</html>